package com.huluobo.koltinim2003a.extention

/**
 * Created by lc on 2022/9/21.
 */

//验证一个String是否符合3-20位的字符,并且首字符为英文
fun String.isValidUserName(): Boolean = matches(Regex("^[a-zA-Z]\\w{2,19}$"))

//验证密码是否为3-20位数字
fun String.isValidPassword(): Boolean = matches(Regex("^[0-9]{3,20}$"))